<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>setBrowserUrl</title>
</head>

<body>
    <div>不刷新修改浏览器地址参数</div>
    <script>
        const setBrowserUrl = url => {
            history.pushState({ url: url }, '', url);
        };
        setBrowserUrl(location.href + '?type=javascript');
    </script>
</body>

</html>